#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include <stdlib.h>
#include <stdio.h>
#include "ViennaRNA/utils/basic.h"
#include "ViennaRNA/utils/strings.h"
#include "ViennaRNA/utils/log.h"
#include "ViennaRNA/io/utils.h"

#include "ViennaRNA/params/ribosum.h"

static float  dm_12_5[7][7] =
{ { 0, 0,        0,        0,         0,         0,         0 },
  { 0, 3.092536, 3.375764, 1.374085,  0.681999,  2.357501,
    2.759147 },
  { 0, 3.375764, 3.223949, 1.077220,  0.713622,  2.742085,
    2.325847 },
  { 0, 1.374085, 1.077220, 0.801987,  -0.251514, 0.289428,
    0.641530 },
  { 0, 0.681999, 0.713622, -0.251514, 1.203844,  -0.228733,
    0.292522 },
  { 0, 2.357501, 2.742085, 0.289428,  -0.228733, 1.511221,
    1.958625 },
  { 0, 2.759147, 2.325847, 0.641530,  0.292522,  1.958625,
    1.948208 } };
static float  dm_12_6[7][7] =
{ { 0, 0,        0,        0,         0,         0,         0 },
  { 0, 3.092373, 3.375631, 1.374059,  0.681938,  2.357565,
    2.759217 },
  { 0, 3.375631, 3.223782, 1.077212,  0.713641,  2.742133,
    2.325829 },
  { 0, 1.374059, 1.077212, 0.801954,  -0.251326, 0.289489,
    0.641712 },
  { 0, 0.681938, 0.713641, -0.251326, 1.203723,  -0.228872,
    0.292526 },
  { 0, 2.357565, 2.742133, 0.289489,  -0.228872, 1.511158,
    1.958685 },
  { 0, 2.759217, 2.325829, 0.641712,  0.292526,  1.958685,
    1.948130 } };
static float  dm_12_7[7][7] =
{ { 0, 0,        0,        0,         0,         0,         0 },
  { 0, 3.053179, 3.352207, 1.390738,  0.684033,  2.353429,
    2.765638 },
  { 0, 3.352207, 3.188833, 1.115659,  0.689646,  2.742801,
    2.338308 },
  { 0, 1.390738, 1.115659, 0.803823,  -0.192463, 0.312652,
    0.698703 },
  { 0, 0.684033, 0.689646, -0.192463, 1.107424,  -0.189709,
    0.302683 },
  { 0, 2.353429, 2.742801, 0.312652,  -0.189709, 1.453439,
    1.907102 },
  { 0, 2.765638, 2.338308, 0.698703,  0.302683,  1.907102,
    1.850447 } };
static float  dm_12_8[7][7] = { { 0, 0,        0,        0,         0,         0,        0        },
                                { 0, 3.049303, 3.270569, 1.417231,  0.666003,  2.313534, 2.891832 },
                                { 0, 3.270569, 3.186336, 1.047878,  0.717329,  2.806323, 2.360206 },
                                { 0, 1.417231, 1.047878, 0.718061,  -0.168063, 0.238106, 0.821674 },
                                { 0, 0.666003, 0.717329, -0.168063, 0.995556,  0.010346, 0.171852 },
                                { 0, 2.313534, 2.806323, 0.238106,  0.010346,  1.361999, 1.906834 },
                                { 0, 2.891832, 2.360206, 0.821674,  0.171852,  1.906834,
                                  1.745436 } };
static float  dm_12_9[7][7] = { { 0, 0,        0,        0,         0,         0,        0        },
                                { 0, 3.165100, 3.153340, 1.293645,  0.683711,  2.215911, 3.082474 },
                                { 0, 3.153340, 3.304615, 1.071703,  0.672898,  2.978487, 2.330174 },
                                { 0, 1.293645, 1.071703, 0.684991,  -0.294258, 0.196122, 0.756948 },
                                { 0, 0.683711, 0.672898, -0.294258, 1.089387,  0.034000, 0.046088 },
                                { 0, 2.215911, 2.978487, 0.196122,  0.034000,  1.457778, 1.997389 },
                                { 0, 3.082474, 2.330174, 0.756948,  0.046088,  1.997389,
                                  1.860867 } };
static float  dm_12_10[7][7] = { { 0, 0,        0,        0,         0,         0,        0         },
                                 { 0, 3.316050, 3.080141, 1.198316,  0.719889,  2.155618, 3.134309  },
                                 { 0, 3.080141, 3.404347, 1.108233,  0.637222,  2.938360, 2.294410  },
                                 { 0, 1.198316, 1.108233, 0.657620,  -0.563942, 0.269879, 0.776661  },
                                 { 0, 0.719889, 0.637222, -0.563942, 1.170892,  0.077878, -0.014940 },
                                 { 0, 2.155618, 2.938360, 0.269879,  0.077878,  1.631701, 2.093486  },
                                 { 0, 3.134309, 2.294410, 0.776661,  -0.014940, 2.093486, 2.008351  } };
static float  dm_12_11[7][7] = { { 0, 0,        0,        0,         0,         0,         0        },
                                 { 0, 4.453617, 3.036904, 0.865118,  0.725919,  2.140436,  3.324865 },
                                 { 0, 3.036904, 4.352423, 0.749665,  0.059865,  2.923511,  2.308393 },
                                 { 0, 0.865118, 0.749665, 0.722300,  -1.323178, 0.374187,  0.426083 },
                                 { 0, 0.725919, 0.059865, -1.323178, 1.727563,  -0.428759, 0.330746 },
                                 { 0, 2.140436, 2.923511, 0.374187,  -0.428759, 2.428389,  2.233568 },
                                 { 0, 3.324865, 2.308393, 0.426083,  0.330746,  2.233568,  2.821057 } };
static float  dm_13_5[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                { 0, 2.533782, 3.282896, 1.521364, 0.752652, 2.264693, 2.589635 },
                                { 0, 3.282896, 2.711135, 0.952877, 1.215201, 2.545641, 2.334410 },
                                { 0, 1.521364, 0.952877, 0.827991, 0.183827, 0.378211, 0.794884 },
                                { 0, 0.752652, 1.215201, 0.183827, 0.819462, 0.368008, 0.475756 },
                                { 0, 2.264693, 2.545641, 0.378211, 0.368008, 1.007668, 1.732095 },
                                { 0, 2.589635, 2.334410, 0.794884, 0.475756, 1.732095, 1.315666 } };
static float  dm_13_6[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                { 0, 2.533730, 3.282872, 1.521367, 0.752640, 2.264708, 2.589641 },
                                { 0, 3.282872, 2.711079, 0.952872, 1.215222, 2.545643, 2.334410 },
                                { 0, 1.521367, 0.952872, 0.827971, 0.183877, 0.378217, 0.794922 },
                                { 0, 0.752640, 1.215222, 0.183877, 0.819423, 0.368018, 0.475753 },
                                { 0, 2.264708, 2.545643, 0.378217, 0.368018, 1.007640, 1.732099 },
                                { 0, 2.589641, 2.334410, 0.794922, 0.475753, 1.732099, 1.315634 } };
static float  dm_13_7[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                { 0, 2.517035, 3.288237, 1.534295, 0.752649, 2.264114, 2.587804 },
                                { 0, 3.288237, 2.694998, 0.956805, 1.227789, 2.542543, 2.336350 },
                                { 0, 1.534295, 0.956805, 0.820438, 0.200329, 0.379706, 0.803818 },
                                { 0, 0.752649, 1.227789, 0.200329, 0.797982, 0.376972, 0.476299 },
                                { 0, 2.264114, 2.542543, 0.379706, 0.376972, 0.988104, 1.718544 },
                                { 0, 2.587804, 2.336350, 0.803818, 0.476299, 1.718544, 1.288938 } };
static float  dm_13_8[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                { 0, 2.455141, 3.267199, 1.550791, 0.740489, 2.281213, 2.624344 },
                                { 0, 3.267199, 2.639092, 0.938981, 1.263224, 2.561521, 2.363191 },
                                { 0, 1.550791, 0.938981, 0.771171, 0.200008, 0.376450, 0.811315 },
                                { 0, 0.740489, 1.263224, 0.200008, 0.754473, 0.422913, 0.493286 },
                                { 0, 2.281213, 2.561521, 0.376450, 0.422913, 0.922402, 1.721243 },
                                { 0, 2.624344, 2.363191, 0.811315, 0.493286, 1.721243, 1.225387 } };
static float  dm_13_9[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                { 0, 2.379212, 3.195011, 1.477942, 0.732266, 2.283994, 2.699509 },
                                { 0, 3.195011, 2.577100, 0.912791, 1.272057, 2.625508, 2.371223 },
                                { 0, 1.477942, 0.912791, 0.737835, 0.193712, 0.381625, 0.838647 },
                                { 0, 0.732266, 1.272057, 0.193712, 0.719631, 0.491776, 0.516184 },
                                { 0, 2.283994, 2.625508, 0.381625, 0.491776, 0.889747, 1.759331 },
                                { 0, 2.699509, 2.371223, 0.838647, 0.516184, 1.759331, 1.193323 } };
static float  dm_13_10[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 2.280425, 3.074698, 1.281893, 0.750335, 2.294618, 2.818548 },
                                 { 0, 3.074698, 2.501446, 0.902613, 1.237324, 2.733365, 2.420051 },
                                 { 0, 1.281893, 0.902613, 0.663356, 0.025119, 0.436734, 0.946242 },
                                 { 0, 0.750335, 1.237324, 0.025119, 0.634862, 0.635376, 0.587841 },
                                 { 0, 2.294618, 2.733365, 0.436734, 0.635376, 0.851475, 1.822634 },
                                 { 0, 2.818548, 2.420051, 0.946242, 0.587841, 1.822634, 1.133656 } };
static float  dm_13_11[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 2.049420, 3.065598, 1.147184, 0.984070, 2.286178, 2.745107 },
                                 { 0, 3.065598, 2.349472, 0.907685, 1.527069, 2.637071, 2.291610 },
                                 { 0, 1.147184, 0.907685, 0.583508, 0.290374, 0.432797, 0.907368 },
                                 { 0, 0.984070, 1.527069, 0.290374, 0.528508, 0.783625, 0.671962 },
                                 { 0, 2.286178, 2.637071, 0.432797, 0.783625, 0.749801, 1.701156 },
                                 { 0, 2.745107, 2.291610, 0.907368, 0.671962, 1.701156, 0.981579 } };
static float  dm_13_12[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.904683, 3.147814, 1.383470, 0.788061, 2.230640, 2.516545 },
                                 { 0, 3.147814, 2.158800, 1.031644, 1.913906, 2.492254, 1.996584 },
                                 { 0, 1.383470, 1.031644, 0.332441, 0.746301, 0.435514, 0.879258 },
                                 { 0, 0.788061, 1.913906, 0.746301, 0.496698, 0.960208, 0.630473 },
                                 { 0, 2.230640, 2.492254, 0.435514, 0.960208, 0.830695, 1.541673 },
                                 { 0, 2.516545, 1.996584, 0.879258, 0.630473, 1.541673, 0.887994 } };
static float  dm_14_5[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                { 0, 2.294989, 3.205559, 1.584266, 0.734475, 2.289599, 2.535028 },
                                { 0, 3.205559, 2.485328, 0.891295, 1.466901, 2.470993, 2.328167 },
                                { 0, 1.584266, 0.891295, 0.759635, 0.320177, 0.322250, 0.907780 },
                                { 0, 0.734475, 1.466901, 0.320177, 0.770910, 0.521607, 0.411958 },
                                { 0, 2.289599, 2.470993, 0.322250, 0.521607, 0.900558, 1.829543 },
                                { 0, 2.535028, 2.328167, 0.907780, 0.411958, 1.829543, 1.149384 } };
static float  dm_14_6[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                { 0, 2.294961, 3.205540, 1.584268, 0.734469, 2.289603, 2.535026 },
                                { 0, 3.205540, 2.485292, 0.891288, 1.466911, 2.470989, 2.328168 },
                                { 0, 1.584268, 0.891288, 0.759627, 0.320205, 0.322258, 0.907802 },
                                { 0, 0.734469, 1.466911, 0.320205, 0.770895, 0.521619, 0.411961 },
                                { 0, 2.289603, 2.470989, 0.322258, 0.521619, 0.900543, 1.829549 },
                                { 0, 2.535026, 2.328168, 0.907802, 0.411961, 1.829549, 1.149367 } };
static float  dm_14_7[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                { 0, 2.284183, 3.205463, 1.589806, 0.733327, 2.290173, 2.534179 },
                                { 0, 3.205463, 2.474571, 0.891349, 1.473391, 2.469534, 2.329742 },
                                { 0, 1.589806, 0.891349, 0.754092, 0.329639, 0.323746, 0.913721 },
                                { 0, 0.733327, 1.473391, 0.329639, 0.760515, 0.527766, 0.413001 },
                                { 0, 2.290173, 2.469534, 0.323746, 0.527766, 0.890631, 1.825071 },
                                { 0, 2.534179, 2.329742, 0.913721, 0.413001, 1.825071, 1.136190 } };
static float  dm_14_8[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                { 0, 2.235726, 3.181914, 1.595503, 0.722770, 2.300997, 2.546218 },
                                { 0, 3.181914, 2.427845, 0.875999, 1.494647, 2.473461, 2.342035 },
                                { 0, 1.595503, 0.875999, 0.724803, 0.342682, 0.323718, 0.932708 },
                                { 0, 0.722770, 1.494647, 0.342682, 0.734102, 0.566070, 0.421129 },
                                { 0, 2.300997, 2.473461, 0.323718, 0.566070, 0.855249, 1.842018 },
                                { 0, 2.546218, 2.342035, 0.932708, 0.421129, 1.842018, 1.098536 } };
static float  dm_14_9[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                { 0, 2.169213, 3.125506, 1.561668, 0.710360, 2.315725, 2.570925 },
                                { 0, 3.125506, 2.366074, 0.850145, 1.506427, 2.491705, 2.351458 },
                                { 0, 1.561668, 0.850145, 0.699815, 0.342923, 0.328538, 0.974691 },
                                { 0, 0.710360, 1.506427, 0.342923, 0.708392, 0.630838, 0.430721 },
                                { 0, 2.315725, 2.491705, 0.328538, 0.630838, 0.830805, 1.888777 },
                                { 0, 2.570925, 2.351458, 0.974691, 0.430721, 1.888777, 1.064891 } };
static float  dm_14_10[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 2.121401, 3.097557, 1.560258, 0.689908, 2.317536, 2.630291 },
                                 { 0, 3.097557, 2.307448, 0.784748, 1.536794, 2.544322, 2.395549 },
                                 { 0, 1.560258, 0.784748, 0.636637, 0.281228, 0.337831, 0.965036 },
                                 { 0, 0.689908, 1.536794, 0.281228, 0.656827, 0.697208, 0.440900 },
                                 { 0, 2.317536, 2.544322, 0.337831, 0.697208, 0.832763, 1.933003 },
                                 { 0, 2.630291, 2.395549, 0.965036, 0.440900, 1.933003, 1.020585 } };
static float  dm_14_11[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 2.073657, 3.129452, 1.652733, 0.683925, 2.335236, 2.616220 },
                                 { 0, 3.129452, 2.249754, 0.745361, 1.637265, 2.557071, 2.392472 },
                                 { 0, 1.652733, 0.745361, 0.597976, 0.222713, 0.343902, 0.889990 },
                                 { 0, 0.683925, 1.637265, 0.222713, 0.624604, 0.786781, 0.435623 },
                                 { 0, 2.335236, 2.557071, 0.343902, 0.786781, 0.831075, 1.905111 },
                                 { 0, 2.616220, 2.392472, 0.889990, 0.435623, 1.905111, 0.955225 } };
static float  dm_14_12[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 2.029277, 3.087264, 1.718185, 0.587838, 2.396044, 2.545040 },
                                 { 0, 3.087264, 2.177344, 0.725318, 1.676438, 2.547083, 2.447849 },
                                 { 0, 1.718185, 0.725318, 0.542734, 0.219786, 0.369477, 0.869417 },
                                 { 0, 0.587838, 1.676438, 0.219786, 0.608994, 0.859758, 0.368574 },
                                 { 0, 2.396044, 2.547083, 0.369477, 0.859758, 0.842019, 2.027160 },
                                 { 0, 2.545040, 2.447849, 0.869417, 0.368574, 2.027160, 0.909170 } };
static float  dm_14_13[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 2.000248, 3.122593, 1.864659, 0.494490, 2.479114, 2.554107 },
                                 { 0, 3.122593, 2.129482, 0.626369, 1.637370, 2.548600, 2.565048 },
                                 { 0, 1.864659, 0.626369, 0.454571, 0.172183, 0.351022, 0.794287 },
                                 { 0, 0.494490, 1.637370, 0.172183, 0.671707, 0.748383, 0.198126 },
                                 { 0, 2.479114, 2.548600, 0.351022, 0.748383, 0.846495, 2.353506 },
                                 { 0, 2.554107, 2.565048, 0.794287, 0.198126, 2.353506, 0.877777 } };
static float  dm_15_5[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                { 0, 2.185017, 3.256348, 1.588804, 0.666905, 2.355718, 2.520031 },
                                { 0, 3.256348, 2.374070, 0.850906, 1.551282, 2.511878, 2.371123 },
                                { 0, 1.588804, 0.850906, 0.689517, 0.366678, 0.267602, 0.985305 },
                                { 0, 0.666905, 1.551282, 0.366678, 0.702683, 0.582839, 0.372196 },
                                { 0, 2.355718, 2.511878, 0.267602, 0.582839, 0.778425, 1.871858 },
                                { 0, 2.520031, 2.371123, 0.985305, 0.372196, 1.871858, 1.031343 } };
static float  dm_15_6[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                { 0, 2.184997, 3.256344, 1.588807, 0.666901, 2.355725, 2.520032 },
                                { 0, 3.256344, 2.374049, 0.850901, 1.551289, 2.511879, 2.371126 },
                                { 0, 1.588807, 0.850901, 0.689501, 0.366694, 0.267601, 0.985320 },
                                { 0, 0.666901, 1.551289, 0.366694, 0.702666, 0.582848, 0.372191 },
                                { 0, 2.355725, 2.511879, 0.267601, 0.582848, 0.778413, 1.871866 },
                                { 0, 2.520032, 2.371126, 0.985320, 0.372191, 1.871866, 1.031328 } };
static float  dm_15_7[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                { 0, 2.178225, 3.255949, 1.591734, 0.666172, 2.356327, 2.519434 },
                                { 0, 3.255949, 2.367187, 0.850656, 1.554802, 2.511035, 2.372193 },
                                { 0, 1.591734, 0.850656, 0.685901, 0.372252, 0.268459, 0.988985 },
                                { 0, 0.666172, 1.554802, 0.372252, 0.696898, 0.586767, 0.372815 },
                                { 0, 2.356327, 2.511035, 0.268459, 0.586767, 0.772770, 1.869928 },
                                { 0, 2.519434, 2.372193, 0.988985, 0.372815, 1.869928, 1.024003 } };
static float  dm_15_8[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                { 0, 2.141127, 3.237374, 1.592766, 0.658485, 2.364123, 2.524356 },
                                { 0, 3.237374, 2.330108, 0.840158, 1.565238, 2.512924, 2.380899 },
                                { 0, 1.592766, 0.840158, 0.665322, 0.384438, 0.266965, 1.010245 },
                                { 0, 0.658485, 1.565238, 0.384438, 0.677947, 0.617501, 0.377062 },
                                { 0, 2.364123, 2.512924, 0.266965, 0.617501, 0.748457, 1.886645 },
                                { 0, 2.524356, 2.380899, 1.010245, 0.377062, 1.886645, 0.998685 } };
static float  dm_15_9[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                { 0, 2.082602, 3.194686, 1.571476, 0.645533, 2.377215, 2.534602 },
                                { 0, 3.194686, 2.272916, 0.822962, 1.573341, 2.520912, 2.393028 },
                                { 0, 1.571476, 0.822962, 0.640049, 0.397585, 0.269078, 1.050093 },
                                { 0, 0.645533, 1.573341, 0.397585, 0.651218, 0.668684, 0.385365 },
                                { 0, 2.377215, 2.520912, 0.269078, 0.668684, 0.720559, 1.929423 },
                                { 0, 2.534602, 2.393028, 1.050093, 0.385365, 1.929423, 0.964692 } };
static float  dm_15_10[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 2.011980, 3.208890, 1.586936, 0.614653, 2.410291, 2.569991 },
                                 { 0, 3.208890, 2.192435, 0.783958, 1.618693, 2.560039, 2.439652 },
                                 { 0, 1.586936, 0.783958, 0.566237, 0.382907, 0.271841, 1.006087 },
                                 { 0, 0.614653, 1.618693, 0.382907, 0.581074, 0.728724, 0.387583 },
                                 { 0, 2.410291, 2.560039, 0.271841, 0.728724, 0.689985, 1.958203 },
                                 { 0, 2.569991, 2.439652, 1.006087, 0.387583, 1.958203, 0.901393 } };
static float  dm_15_11[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.960846, 3.364729, 1.711101, 0.580163, 2.436976, 2.568375 },
                                 { 0, 3.364729, 2.127484, 0.757940, 1.724525, 2.572193, 2.449286 },
                                 { 0, 1.711101, 0.757940, 0.506015, 0.306759, 0.248888, 0.900846 },
                                 { 0, 0.580163, 1.724525, 0.306759, 0.515784, 0.796313, 0.387969 },
                                 { 0, 2.436976, 2.572193, 0.248888, 0.796313, 0.651734, 1.900198 },
                                 { 0, 2.568375, 2.449286, 0.900846, 0.387969, 1.900198, 0.825616 } };
static float  dm_15_12[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.905112, 3.368458, 1.738759, 0.521209, 2.469970, 2.532597 },
                                 { 0, 3.368458, 2.057336, 0.733674, 1.764054, 2.567498, 2.475677 },
                                 { 0, 1.738759, 0.733674, 0.452960, 0.356533, 0.263124, 0.915940 },
                                 { 0, 0.521209, 1.764054, 0.356533, 0.468384, 0.825416, 0.393747 },
                                 { 0, 2.469970, 2.567498, 0.263124, 0.825416, 0.620497, 1.933061 },
                                 { 0, 2.532597, 2.475677, 0.915940, 0.393747, 1.933061, 0.776274 } };
static float  dm_15_13[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.764334, 3.521734, 1.844636, 0.465089, 2.475371, 2.501349 },
                                 { 0, 3.521734, 1.899254, 0.652013, 1.866354, 2.519286, 2.498764 },
                                 { 0, 1.844636, 0.652013, 0.373857, 0.494613, 0.240469, 1.003296 },
                                 { 0, 0.465089, 1.866354, 0.494613, 0.346332, 0.823497, 0.447243 },
                                 { 0, 2.475371, 2.519286, 0.240469, 0.823497, 0.468987, 1.894554 },
                                 { 0, 2.501349, 2.498764, 1.003296, 0.447243, 1.894554, 0.650703 } };
static float  dm_15_14[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.753217, 3.560554, 1.890084, 0.497526, 2.482621, 2.508029 },
                                 { 0, 3.560554, 1.886087, 0.571603, 1.903238, 2.518939, 2.505216 },
                                 { 0, 1.890084, 0.571603, 0.375259, 0.535512, 0.227112, 1.009415 },
                                 { 0, 0.497526, 1.903238, 0.535512, 0.355054, 0.732221, 0.497356 },
                                 { 0, 2.482621, 2.518939, 0.227112, 0.732221, 0.453713, 1.824189 },
                                 { 0, 2.508029, 2.505216, 1.009415, 0.497356, 1.824189, 0.649442 } };
static float  dm_16_5[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                { 0, 2.096356, 3.297512, 1.643277, 0.627608, 2.425850, 2.531892 },
                                { 0, 3.297512, 2.277720, 0.776768, 1.578330, 2.507998, 2.381738 },
                                { 0, 1.643277, 0.776768, 0.652789, 0.376193, 0.205475, 1.050591 },
                                { 0, 0.627608, 1.578330, 0.376193, 0.635057, 0.695045, 0.328657 },
                                { 0, 2.425850, 2.507998, 0.205475, 0.695045, 0.647026, 1.971812 },
                                { 0, 2.531892, 2.381738, 1.050591, 0.328657, 1.971812, 0.893562 } };
static float  dm_16_6[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                { 0, 2.096346, 3.297510, 1.643276, 0.627604, 2.425854, 2.531894 },
                                { 0, 3.297510, 2.277709, 0.776764, 1.578331, 2.508000, 2.381737 },
                                { 0, 1.643276, 0.776764, 0.652783, 0.376197, 0.205477, 1.050597 },
                                { 0, 0.627604, 1.578331, 0.376197, 0.635048, 0.695048, 0.328658 },
                                { 0, 2.425854, 2.508000, 0.205477, 0.695048, 0.647022, 1.971820 },
                                { 0, 2.531894, 2.381737, 1.050597, 0.328658, 1.971820, 0.893558 } };
static float  dm_16_7[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                { 0, 2.092914, 3.296980, 1.644541, 0.627228, 2.426164, 2.531487 },
                                { 0, 3.296980, 2.274181, 0.776531, 1.579823, 2.507496, 2.382211 },
                                { 0, 1.644541, 0.776531, 0.650930, 0.378902, 0.205995, 1.052513 },
                                { 0, 0.627228, 1.579823, 0.378902, 0.632483, 0.697137, 0.329046 },
                                { 0, 2.426164, 2.507496, 0.205995, 0.697137, 0.644461, 1.971311 },
                                { 0, 2.531487, 2.382211, 1.052513, 0.329046, 1.971311, 0.890302 } };
static float  dm_16_8[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                { 0, 2.073428, 3.286494, 1.644950, 0.623462, 2.430093, 2.532505 },
                                { 0, 3.286494, 2.254339, 0.771248, 1.583832, 2.507212, 2.385719 },
                                { 0, 1.644950, 0.771248, 0.640496, 0.385785, 0.205764, 1.064654 },
                                { 0, 0.623462, 1.583832, 0.385785, 0.622568, 0.714265, 0.331069 },
                                { 0, 2.430093, 2.507212, 0.205764, 0.714265, 0.632331, 1.982670 },
                                { 0, 2.532505, 2.385719, 1.064654, 0.331069, 1.982670, 0.877393 } };
static float  dm_16_9[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                { 0, 2.040939, 3.265472, 1.637410, 0.615748, 2.438042, 2.535927 },
                                { 0, 3.265472, 2.221433, 0.760900, 1.588059, 2.509252, 2.391099 },
                                { 0, 1.637410, 0.760900, 0.625103, 0.394320, 0.206172, 1.085801 },
                                { 0, 0.615748, 1.588059, 0.394320, 0.606102, 0.744667, 0.334067 },
                                { 0, 2.438042, 2.509252, 0.206172, 0.744667, 0.614764, 2.010608 },
                                { 0, 2.535927, 2.391099, 1.085801, 0.334067, 2.010608, 0.856570 } };
static float  dm_16_10[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.929517, 3.299150, 1.679136, 0.598406, 2.478683, 2.546578 },
                                 { 0, 3.299150, 2.091719, 0.711831, 1.702824, 2.519268, 2.443818 },
                                 { 0, 1.679136, 0.711831, 0.530571, 0.408434, 0.197624, 1.036293 },
                                 { 0, 0.598406, 1.702824, 0.408434, 0.495823, 0.861514, 0.331873 },
                                 { 0, 2.478683, 2.519268, 0.197624, 0.861514, 0.535526, 2.017192 },
                                 { 0, 2.546578, 2.443818, 1.036293, 0.331873, 2.017192, 0.751594 } };
static float  dm_16_11[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.790624, 3.419792, 1.804745, 0.585040, 2.511724, 2.507394 },
                                 { 0, 3.419792, 1.936325, 0.655038, 1.866549, 2.481327, 2.473116 },
                                 { 0, 1.804745, 0.655038, 0.440211, 0.419147, 0.190157, 0.999819 },
                                 { 0, 0.585040, 1.866549, 0.419147, 0.384589, 0.972519, 0.349591 },
                                 { 0, 2.511724, 2.481327, 0.190157, 0.972519, 0.439998, 1.950823 },
                                 { 0, 2.507394, 2.473116, 0.999819, 0.349591, 1.950823, 0.634690 } };
static float  dm_16_12[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.738485, 3.413306, 1.823292, 0.565589, 2.524720, 2.483688 },
                                 { 0, 3.413306, 1.875156, 0.624931, 1.902547, 2.464176, 2.477746 },
                                 { 0, 1.823292, 0.624931, 0.407593, 0.460985, 0.201735, 1.024667 },
                                 { 0, 0.565589, 1.902547, 0.460985, 0.347262, 1.021166, 0.354417 },
                                 { 0, 2.524720, 2.464176, 0.201735, 1.021166, 0.409784, 1.969276 },
                                 { 0, 2.483688, 2.477746, 1.024667, 0.354417, 1.969276, 0.597237 } };
static float  dm_16_13[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.664768, 3.405759, 1.848635, 0.546367, 2.518192, 2.460663 },
                                 { 0, 3.405759, 1.785451, 0.567988, 1.961108, 2.436129, 2.469090 },
                                 { 0, 1.848635, 0.567988, 0.373320, 0.524553, 0.220489, 1.071079 },
                                 { 0, 0.546367, 1.961108, 0.524553, 0.294419, 1.099707, 0.370092 },
                                 { 0, 2.518192, 2.436129, 0.220489, 1.099707, 0.364109, 1.982751 },
                                 { 0, 2.460663, 2.469090, 1.071079, 0.370092, 1.982751, 0.552731 } };
static float  dm_16_14[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.586401, 3.322065, 1.884482, 0.570145, 2.512906, 2.427617 },
                                 { 0, 3.322065, 1.692728, 0.531570, 1.996685, 2.415287, 2.448701 },
                                 { 0, 1.884482, 0.531570, 0.352236, 0.601762, 0.215346, 1.113649 },
                                 { 0, 0.570145, 1.996685, 0.601762, 0.269440, 1.208804, 0.368633 },
                                 { 0, 2.512906, 2.415287, 0.215346, 1.208804, 0.308130, 2.023351 },
                                 { 0, 2.427617, 2.448701, 1.113649, 0.368633, 2.023351, 0.509060 } };
static float  dm_16_15[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.663168, 3.308261, 1.850005, 0.549647, 2.516260, 2.489382 },
                                 { 0, 3.308261, 1.762303, 0.472887, 1.999308, 2.452056, 2.487940 },
                                 { 0, 1.850005, 0.472887, 0.321624, 0.611101, 0.250077, 1.031153 },
                                 { 0, 0.549647, 1.999308, 0.611101, 0.328556, 1.140290, 0.273025 },
                                 { 0, 2.516260, 2.452056, 0.250077, 1.140290, 0.460515, 2.003803 },
                                 { 0, 2.489382, 2.487940, 1.031153, 0.273025, 2.003803, 0.593446 } };
static float  dm_17_5[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                { 0, 2.007833, 3.291241, 1.663891, 0.607307, 2.464689, 2.554022 },
                                { 0, 3.291241, 2.181349, 0.736718, 1.592793, 2.504274, 2.379900 },
                                { 0, 1.663891, 0.736718, 0.616428, 0.445344, 0.161487, 1.114375 },
                                { 0, 0.607307, 1.592793, 0.445344, 0.571508, 0.773714, 0.288043 },
                                { 0, 2.464689, 2.504274, 0.161487, 0.773714, 0.544800, 2.054002 },
                                { 0, 2.554022, 2.379900, 1.114375, 0.288043, 2.054002, 0.814483 } };
static float  dm_17_6[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                { 0, 2.007829, 3.291242, 1.663892, 0.607308, 2.464688, 2.554020 },
                                { 0, 3.291242, 2.181345, 0.736719, 1.592796, 2.504272, 2.379900 },
                                { 0, 1.663892, 0.736719, 0.616427, 0.445344, 0.161487, 1.114376 },
                                { 0, 0.607308, 1.592796, 0.445344, 0.571507, 0.773715, 0.288042 },
                                { 0, 2.464688, 2.504272, 0.161487, 0.773715, 0.544799, 2.054004 },
                                { 0, 2.554020, 2.379900, 1.114376, 0.288042, 2.054004, 0.814482 } };
static float  dm_17_7[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                { 0, 2.006511, 3.290918, 1.664311, 0.607172, 2.464800, 2.553839 },
                                { 0, 3.290918, 2.179982, 0.736617, 1.593288, 2.504065, 2.380066 },
                                { 0, 1.664311, 0.736617, 0.615720, 0.446361, 0.161718, 1.115108 },
                                { 0, 0.607172, 1.593288, 0.446361, 0.570613, 0.774548, 0.288223 },
                                { 0, 2.464800, 2.504065, 0.161718, 0.774548, 0.543905, 2.053924 },
                                { 0, 2.553839, 2.380066, 1.115108, 0.288223, 2.053924, 0.813353 } };
static float  dm_17_8[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                { 0, 1.997746, 3.285639, 1.664262, 0.605619, 2.466015, 2.554194 },
                                { 0, 3.285639, 2.170945, 0.734627, 1.594479, 2.504060, 2.380880 },
                                { 0, 1.664262, 0.734627, 0.611204, 0.449825, 0.161638, 1.120324 },
                                { 0, 0.605619, 1.594479, 0.449825, 0.566330, 0.782686, 0.288928 },
                                { 0, 2.466015, 2.504060, 0.161638, 0.782686, 0.538801, 2.060339 },
                                { 0, 2.554194, 2.380880, 1.120324, 0.288928, 2.060339, 0.807944 } };
static float  dm_17_9[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                { 0, 1.982793, 3.276596, 1.661720, 0.602603, 2.468779, 2.554925 },
                                { 0, 3.276596, 2.155408, 0.730430, 1.596575, 2.504169, 2.382555 },
                                { 0, 1.661720, 0.730430, 0.603805, 0.454813, 0.162205, 1.129925 },
                                { 0, 0.602603, 1.596575, 0.454813, 0.558528, 0.796813, 0.290137 },
                                { 0, 2.468779, 2.504169, 0.162205, 0.796813, 0.530589, 2.073034 },
                                { 0, 2.554925, 2.382555, 1.129925, 0.290137, 2.073034, 0.798318 } };
static float  dm_17_10[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.832394, 3.307697, 1.711062, 0.587652, 2.500571, 2.542166 },
                                 { 0, 3.307697, 1.983636, 0.677419, 1.738092, 2.497012, 2.437609 },
                                 { 0, 1.711062, 0.677419, 0.494725, 0.489828, 0.154804, 1.109600 },
                                 { 0, 0.587652, 1.738092, 0.489828, 0.434240, 0.948956, 0.303653 },
                                 { 0, 2.500571, 2.497012, 0.154804, 0.948956, 0.429058, 2.071173 },
                                 { 0, 2.542166, 2.437609, 1.109600, 0.303653, 2.071173, 0.671361 } };
static float  dm_17_11[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.633896, 3.402351, 1.834789, 0.578697, 2.521230, 2.483018 },
                                 { 0, 3.402351, 1.765915, 0.619865, 1.929028, 2.436812, 2.470046 },
                                 { 0, 1.834789, 0.619865, 0.383602, 0.561116, 0.161953, 1.095287 },
                                 { 0, 0.578697, 1.929028, 0.561116, 0.306100, 1.098171, 0.336383 },
                                 { 0, 2.521230, 2.436812, 0.161953, 1.098171, 0.313977, 2.003038 },
                                 { 0, 2.483018, 2.470046, 1.095287, 0.336383, 2.003038, 0.532942 } };
static float  dm_17_12[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.595425, 3.398979, 1.849409, 0.570570, 2.521120, 2.468389 },
                                 { 0, 3.398979, 1.722025, 0.598918, 1.955315, 2.423195, 2.464611 },
                                 { 0, 1.849409, 0.598918, 0.364362, 0.591967, 0.170305, 1.116927 },
                                 { 0, 0.570570, 1.955315, 0.591967, 0.283012, 1.131490, 0.342010 },
                                 { 0, 2.521120, 2.423195, 0.170305, 1.131490, 0.296061, 2.010796 },
                                 { 0, 2.468389, 2.464611, 1.116927, 0.342010, 2.010796, 0.511111 } };
static float  dm_17_13[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.549012, 3.376494, 1.861681, 0.554571, 2.504364, 2.452632 },
                                 { 0, 3.376494, 1.665273, 0.557068, 1.995296, 2.410242, 2.446184 },
                                 { 0, 1.861681, 0.557068, 0.344309, 0.638901, 0.190280, 1.155475 },
                                 { 0, 0.554571, 1.995296, 0.638901, 0.253950, 1.182863, 0.350164 },
                                 { 0, 2.504364, 2.410242, 0.190280, 1.182863, 0.281259, 2.030459 },
                                 { 0, 2.452632, 2.446184, 1.155475, 0.350164, 2.030459, 0.492848 } };
static float  dm_17_14[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.495463, 3.333516, 1.880225, 0.561395, 2.499855, 2.437629 },
                                 { 0, 3.333516, 1.603946, 0.541227, 2.013724, 2.402244, 2.432190 },
                                 { 0, 1.880225, 0.541227, 0.328083, 0.699849, 0.185966, 1.189426 },
                                 { 0, 0.561395, 2.013724, 0.699849, 0.236830, 1.224252, 0.355651 },
                                 { 0, 2.499855, 2.402244, 0.185966, 1.224252, 0.250988, 2.050938 },
                                 { 0, 2.437629, 2.432190, 1.189426, 0.355651, 2.050938, 0.468514 } };
static float  dm_17_15[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.445032, 3.277640, 1.899860, 0.579524, 2.495022, 2.453726 },
                                 { 0, 3.277640, 1.540316, 0.514869, 2.009604, 2.432139, 2.400556 },
                                 { 0, 1.899860, 0.514869, 0.290900, 0.783431, 0.190682, 1.228429 },
                                 { 0, 0.579524, 2.009604, 0.783431, 0.228588, 1.227334, 0.350982 },
                                 { 0, 2.495022, 2.432139, 0.190682, 1.227334, 0.254986, 2.050370 },
                                 { 0, 2.453726, 2.400556, 1.228429, 0.350982, 2.050370, 0.451843 } };
static float  dm_17_16[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.488960, 3.203613, 1.823525, 0.490317, 2.511323, 2.529750 },
                                 { 0, 3.203613, 1.582014, 0.402531, 1.848617, 2.505082, 2.396065 },
                                 { 0, 1.823525, 0.402531, 0.270031, 0.719134, 0.275540, 1.315131 },
                                 { 0, 0.490317, 1.848617, 0.719134, 0.249862, 1.211044, 0.369940 },
                                 { 0, 2.511323, 2.505082, 0.275540, 1.211044, 0.401915, 2.139891 },
                                 { 0, 2.529750, 2.396065, 1.315131, 0.369940, 2.139891, 0.524210 } };
static float  dm_18_5[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                { 0, 1.959599, 3.270973, 1.671129, 0.574402, 2.470822, 2.567678 },
                                { 0, 3.270973, 2.124333, 0.699437, 1.586377, 2.503971, 2.367755 },
                                { 0, 1.671129, 0.699437, 0.602529, 0.514746, 0.131217, 1.191973 },
                                { 0, 0.574402, 1.586377, 0.514746, 0.543897, 0.783468, 0.266230 },
                                { 0, 2.470822, 2.503971, 0.131217, 0.783468, 0.523535, 2.125332 },
                                { 0, 2.567678, 2.367755, 1.191973, 0.266230, 2.125332, 0.795089 } };
static float  dm_18_6[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                { 0, 1.959599, 3.270973, 1.671129, 0.574402, 2.470822, 2.567678 },
                                { 0, 3.270973, 2.124333, 0.699437, 1.586377, 2.503971, 2.367755 },
                                { 0, 1.671129, 0.699437, 0.602529, 0.514746, 0.131217, 1.191973 },
                                { 0, 0.574402, 1.586377, 0.514746, 0.543897, 0.783468, 0.266230 },
                                { 0, 2.470822, 2.503971, 0.131217, 0.783468, 0.523535, 2.125332 },
                                { 0, 2.567678, 2.367755, 1.191973, 0.266230, 2.125332, 0.795089 } };
static float  dm_18_7[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                { 0, 1.959107, 3.270822, 1.671269, 0.574356, 2.470852, 2.567602 },
                                { 0, 3.270822, 2.123822, 0.699405, 1.586546, 2.503884, 2.367804 },
                                { 0, 1.671269, 0.699405, 0.602271, 0.515123, 0.131315, 1.192250 },
                                { 0, 0.574356, 1.586546, 0.515123, 0.543584, 0.783791, 0.266309 },
                                { 0, 2.470852, 2.503884, 0.131315, 0.783791, 0.523221, 2.125324 },
                                { 0, 2.567602, 2.367804, 1.192250, 0.266309, 2.125324, 0.794693 } };
static float  dm_18_8[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                { 0, 1.954893, 3.267998, 1.671033, 0.573675, 2.471278, 2.567651 },
                                { 0, 3.267998, 2.119451, 0.698449, 1.587072, 2.503825, 2.367971 },
                                { 0, 1.671033, 0.698449, 0.600163, 0.516924, 0.131274, 1.194926 },
                                { 0, 0.573675, 1.587072, 0.516924, 0.541618, 0.787988, 0.266654 },
                                { 0, 2.471278, 2.503825, 0.131274, 0.787988, 0.520857, 2.128706 },
                                { 0, 2.567651, 2.367971, 1.194926, 0.266654, 2.128706, 0.792170 } };
static float  dm_18_9[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                { 0, 1.945124, 3.264181, 1.671424, 0.571213, 2.472533, 2.567351 },
                                { 0, 3.264181, 2.109123, 0.695302, 1.589162, 2.502780, 2.369180 },
                                { 0, 1.671424, 0.695302, 0.595101, 0.519845, 0.132914, 1.201167 },
                                { 0, 0.571213, 1.589162, 0.519845, 0.536309, 0.796405, 0.268040 },
                                { 0, 2.472533, 2.502780, 0.132914, 0.796405, 0.515207, 2.135443 },
                                { 0, 2.567351, 2.369180, 1.201167, 0.268040, 2.135443, 0.785257 } };
static float  dm_18_10[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.778806, 3.290372, 1.729008, 0.558489, 2.496256, 2.542594 },
                                 { 0, 3.290372, 1.919078, 0.640136, 1.742877, 2.490111, 2.425930 },
                                 { 0, 1.729008, 0.640136, 0.481526, 0.559858, 0.122004, 1.188502 },
                                 { 0, 0.558489, 1.742877, 0.559858, 0.408793, 0.965121, 0.290692 },
                                 { 0, 2.496256, 2.490111, 0.122004, 0.965121, 0.406294, 2.135398 },
                                 { 0, 2.542594, 2.425930, 1.188502, 0.290692, 2.135398, 0.650811 } };
static float  dm_18_11[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.541260, 3.359887, 1.863305, 0.552149, 2.512117, 2.465080 },
                                 { 0, 3.359887, 1.659552, 0.577262, 1.954784, 2.419679, 2.467978 },
                                 { 0, 1.863305, 0.577262, 0.355424, 0.658994, 0.133093, 1.173777 },
                                 { 0, 0.552149, 1.954784, 0.658994, 0.268144, 1.152204, 0.340224 },
                                 { 0, 2.512117, 2.419679, 0.133093, 1.152204, 0.278844, 2.069528 },
                                 { 0, 2.465080, 2.467978, 1.173777, 0.340224, 2.069528, 0.496656 } };
static float  dm_18_12[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.515109, 3.355111, 1.873865, 0.547484, 2.509063, 2.454676 },
                                 { 0, 3.355111, 1.629923, 0.562408, 1.973041, 2.410124, 2.462343 },
                                 { 0, 1.873865, 0.562408, 0.343602, 0.682667, 0.137341, 1.188539 },
                                 { 0, 0.547484, 1.973041, 0.682667, 0.253609, 1.175520, 0.346154 },
                                 { 0, 2.509063, 2.410124, 0.137341, 1.175520, 0.268542, 2.074538 },
                                 { 0, 2.454676, 2.462343, 1.188539, 0.346154, 2.074538, 0.483464 } };
static float  dm_18_13[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.473845, 3.334992, 1.883878, 0.535323, 2.497538, 2.439103 },
                                 { 0, 3.334992, 1.582030, 0.528874, 2.002078, 2.397872, 2.448436 },
                                 { 0, 1.883878, 0.528874, 0.327587, 0.725281, 0.148692, 1.223566 },
                                 { 0, 0.535323, 2.002078, 0.725281, 0.230794, 1.216739, 0.355996 },
                                 { 0, 2.497538, 2.397872, 0.148692, 1.216739, 0.256653, 2.092929 },
                                 { 0, 2.439103, 2.448436, 1.223566, 0.355996, 2.092929, 0.466494 } };
static float  dm_18_14[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.438699, 3.305116, 1.892865, 0.534599, 2.498865, 2.427961 },
                                 { 0, 3.305116, 1.541486, 0.516396, 2.013794, 2.391791, 2.443225 },
                                 { 0, 1.892865, 0.516396, 0.314606, 0.768388, 0.147398, 1.244406 },
                                 { 0, 0.534599, 2.013794, 0.768388, 0.219136, 1.239877, 0.363050 },
                                 { 0, 2.498865, 2.391791, 0.147398, 1.239877, 0.245018, 2.106483 },
                                 { 0, 2.427961, 2.443225, 1.244406, 0.363050, 2.106483, 0.452624 } };
static float  dm_18_15[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.402188, 3.243491, 1.873197, 0.523749, 2.513206, 2.440632 },
                                 { 0, 3.243491, 1.493880, 0.479570, 2.003177, 2.410569, 2.437229 },
                                 { 0, 1.873197, 0.479570, 0.286984, 0.854376, 0.156044, 1.259959 },
                                 { 0, 0.523749, 2.003177, 0.854376, 0.211875, 1.261759, 0.358950 },
                                 { 0, 2.513206, 2.410569, 0.156044, 1.261759, 0.268410, 2.128211 },
                                 { 0, 2.440632, 2.437229, 1.259959, 0.358950, 2.128211, 0.448424 } };
static float  dm_18_16[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.399936, 3.187488, 1.813113, 0.458372, 2.536421, 2.523106 },
                                 { 0, 3.187488, 1.481063, 0.386274, 1.879206, 2.472031, 2.470590 },
                                 { 0, 1.813113, 0.386274, 0.260196, 0.908918, 0.241168, 1.252977 },
                                 { 0, 0.458372, 1.879206, 0.908918, 0.212976, 1.264362, 0.319339 },
                                 { 0, 2.536421, 2.472031, 0.241168, 1.264362, 0.364359, 2.184745 },
                                 { 0, 2.523106, 2.470590, 1.252977, 0.319339, 2.184745, 0.485249 } };
static float  dm_18_17[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.267458, 3.104292, 1.954389, 0.508102, 2.474593, 2.482510 },
                                 { 0, 3.104292, 1.332773, 0.384678, 1.918735, 2.426904, 2.409497 },
                                 { 0, 1.954389, 0.384678, 0.231292, 1.095239, 0.222912, 1.303908 },
                                 { 0, 0.508102, 1.918735, 1.095239, 0.194026, 1.349575, 0.325298 },
                                 { 0, 2.474593, 2.426904, 0.222912, 1.349575, 0.302607, 2.167885 },
                                 { 0, 2.482510, 2.409497, 1.303908, 0.325298, 2.167885, 0.414809 } };
static float  dm_19_5[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                { 0, 1.925029, 3.259785, 1.678082, 0.532879, 2.480385, 2.567162 },
                                { 0, 3.259785, 2.081752, 0.661029, 1.587558, 2.507624, 2.352855 },
                                { 0, 1.678082, 0.661029, 0.587688, 0.564095, 0.115803, 1.245217 },
                                { 0, 0.532879, 1.587558, 0.564095, 0.523708, 0.804297, 0.259865 },
                                { 0, 2.480385, 2.507624, 0.115803, 0.804297, 0.509191, 2.180337 },
                                { 0, 2.567162, 2.352855, 1.245217, 0.259865, 2.180337, 0.778683 } };
static float  dm_19_6[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                { 0, 1.925029, 3.259785, 1.678082, 0.532879, 2.480385, 2.567162 },
                                { 0, 3.259785, 2.081752, 0.661029, 1.587558, 2.507624, 2.352855 },
                                { 0, 1.678082, 0.661029, 0.587688, 0.564095, 0.115803, 1.245217 },
                                { 0, 0.532879, 1.587558, 0.564095, 0.523708, 0.804297, 0.259865 },
                                { 0, 2.480385, 2.507624, 0.115803, 0.804297, 0.509191, 2.180337 },
                                { 0, 2.567162, 2.352855, 1.245217, 0.259865, 2.180337, 0.778683 } };
static float  dm_19_7[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                { 0, 1.924817, 3.259699, 1.678128, 0.532863, 2.480398, 2.567133 },
                                { 0, 3.259699, 2.081532, 0.661015, 1.587619, 2.507590, 2.352872 },
                                { 0, 1.678128, 0.661015, 0.587581, 0.564243, 0.115852, 1.245339 },
                                { 0, 0.532863, 1.587619, 0.564243, 0.523585, 0.804442, 0.259908 },
                                { 0, 2.480398, 2.507590, 0.115852, 0.804442, 0.509065, 2.180349 },
                                { 0, 2.567133, 2.352872, 1.245339, 0.259908, 2.180349, 0.778524 } };
static float  dm_19_8[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                { 0, 1.921707, 3.257254, 1.677579, 0.532391, 2.480555, 2.567179 },
                                { 0, 3.257254, 2.078298, 0.660245, 1.587790, 2.507604, 2.352655 },
                                { 0, 1.677579, 0.660245, 0.586053, 0.565436, 0.115818, 1.247825 },
                                { 0, 0.532391, 1.587790, 0.565436, 0.522217, 0.807816, 0.260351 },
                                { 0, 2.480555, 2.507604, 0.115818, 0.807816, 0.507451, 2.183255 },
                                { 0, 2.567179, 2.352655, 1.247825, 0.260351, 2.183255, 0.776767 } };
static float  dm_19_9[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                { 0, 1.914948, 3.253973, 1.677337, 0.531084, 2.481010, 2.566882 },
                                { 0, 3.253973, 2.071131, 0.658362, 1.589059, 2.507048, 2.352997 },
                                { 0, 1.677337, 0.658362, 0.582634, 0.567513, 0.117022, 1.252162 },
                                { 0, 0.531084, 1.589059, 0.567513, 0.518726, 0.814061, 0.261409 },
                                { 0, 2.481010, 2.507048, 0.117022, 0.814061, 0.503793, 2.188359 },
                                { 0, 2.566882, 2.352997, 1.252162, 0.261409, 2.188359, 0.772214 } };
static float  dm_19_10[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.742218, 3.274206, 1.736365, 0.520548, 2.506409, 2.538636 },
                                 { 0, 3.274206, 1.874376, 0.601999, 1.751372, 2.493109, 2.410477 },
                                 { 0, 1.736365, 0.601999, 0.469932, 0.605555, 0.101804, 1.237622 },
                                 { 0, 0.520548, 1.751372, 0.605555, 0.394004, 0.990584, 0.288953 },
                                 { 0, 2.506409, 2.493109, 0.101804, 0.990584, 0.393873, 2.187079 },
                                 { 0, 2.538636, 2.410477, 1.237622, 0.288953, 2.187079, 0.636158 } };
static float  dm_19_11[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.468048, 3.334714, 1.879583, 0.513847, 2.525290, 2.448642 },
                                 { 0, 3.334714, 1.575000, 0.532017, 1.991892, 2.413770, 2.459092 },
                                 { 0, 1.879583, 0.532017, 0.330291, 0.714265, 0.121153, 1.217842 },
                                 { 0, 0.513847, 1.991892, 0.714265, 0.242569, 1.209724, 0.357392 },
                                 { 0, 2.525290, 2.413770, 0.121153, 1.209724, 0.254157, 2.113204 },
                                 { 0, 2.448642, 2.459092, 1.217842, 0.357392, 2.113204, 0.465079 } };
static float  dm_19_12[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.447264, 3.331175, 1.887623, 0.510032, 2.522588, 2.440064 },
                                 { 0, 3.331175, 1.551640, 0.520175, 2.006256, 2.406278, 2.453450 },
                                 { 0, 1.887623, 0.520175, 0.321641, 0.733595, 0.124449, 1.227696 },
                                 { 0, 0.510032, 2.006256, 0.733595, 0.232046, 1.228902, 0.363719 },
                                 { 0, 2.522588, 2.406278, 0.124449, 1.228902, 0.246735, 2.116614 },
                                 { 0, 2.440064, 2.453450, 1.227696, 0.363719, 2.116614, 0.455445 } };
static float  dm_19_13[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.413676, 3.312147, 1.892690, 0.497363, 2.513815, 2.427618 },
                                 { 0, 3.312147, 1.512635, 0.491529, 2.029384, 2.398107, 2.440346 },
                                 { 0, 1.892690, 0.491529, 0.309708, 0.770725, 0.131677, 1.255730 },
                                 { 0, 0.497363, 2.029384, 0.770725, 0.215276, 1.262537, 0.375238 },
                                 { 0, 2.513815, 2.398107, 0.131677, 1.262537, 0.238420, 2.134600 },
                                 { 0, 2.427618, 2.440346, 1.255730, 0.375238, 2.134600, 0.443272 } };
static float  dm_19_14[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.390424, 3.289395, 1.895911, 0.494394, 2.515601, 2.419213 },
                                 { 0, 3.289395, 1.485413, 0.482937, 2.038817, 2.393102, 2.437050 },
                                 { 0, 1.895911, 0.482937, 0.301201, 0.802783, 0.131369, 1.267332 },
                                 { 0, 0.494394, 2.038817, 0.802783, 0.208219, 1.278597, 0.381488 },
                                 { 0, 2.515601, 2.393102, 0.131369, 1.278597, 0.233137, 2.145289 },
                                 { 0, 2.419213, 2.437050, 1.267332, 0.381488, 2.145289, 0.435049 } };
static float  dm_19_15[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.359065, 3.252756, 1.879860, 0.477404, 2.530994, 2.422584 },
                                 { 0, 3.252756, 1.444344, 0.446651, 2.034691, 2.393761, 2.436293 },
                                 { 0, 1.879860, 0.446651, 0.279248, 0.878068, 0.136700, 1.277241 },
                                 { 0, 0.477404, 2.034691, 0.878068, 0.203105, 1.302254, 0.369173 },
                                 { 0, 2.530994, 2.393761, 0.136700, 1.302254, 0.254187, 2.176724 },
                                 { 0, 2.422584, 2.436293, 1.277241, 0.369173, 2.176724, 0.429742 } };
static float  dm_19_16[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.319235, 3.187463, 1.883259, 0.425750, 2.549595, 2.483464 },
                                 { 0, 3.187463, 1.390041, 0.356901, 1.935186, 2.431514, 2.438827 },
                                 { 0, 1.883259, 0.356901, 0.250462, 1.025379, 0.218729, 1.267437 },
                                 { 0, 0.425750, 1.935186, 1.025379, 0.196407, 1.314921, 0.319083 },
                                 { 0, 2.549595, 2.431514, 0.218729, 1.314921, 0.318075, 2.206259 },
                                 { 0, 2.483464, 2.438827, 1.267437, 0.319083, 2.206259, 0.438250 } };
static float  dm_19_17[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.160111, 3.036527, 2.090520, 0.506996, 2.523007, 2.425038 },
                                 { 0, 3.036527, 1.210398, 0.370582, 1.975521, 2.395384, 2.342602 },
                                 { 0, 2.090520, 0.370582, 0.208600, 1.267580, 0.187575, 1.340450 },
                                 { 0, 0.506996, 1.975521, 1.267580, 0.167525, 1.417493, 0.331364 },
                                 { 0, 2.523007, 2.395384, 0.187575, 1.417493, 0.245059, 2.119651 },
                                 { 0, 2.425038, 2.342602, 1.340450, 0.331364, 2.119651, 0.347729 } };
static float  dm_19_18[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.088965, 3.033821, 2.120758, 0.473214, 2.457352, 2.432026 },
                                 { 0, 3.033821, 1.133849, 0.379829, 2.009372, 2.419403, 2.321236 },
                                 { 0, 2.120758, 0.379829, 0.179593, 1.357010, 0.233102, 1.418578 },
                                 { 0, 0.473214, 2.009372, 1.357010, 0.153161, 1.425354, 0.285522 },
                                 { 0, 2.457352, 2.419403, 0.233102, 1.425354, 0.262864, 2.054949 },
                                 { 0, 2.432026, 2.321236, 1.418578, 0.285522, 2.054949, 0.338514 } };
static float  dm_20_5[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                { 0, 1.897075, 3.279011, 1.691793, 0.504730, 2.480118, 2.562844 },
                                { 0, 3.279011, 2.039856, 0.633859, 1.632167, 2.502239, 2.351187 },
                                { 0, 1.691793, 0.633859, 0.568358, 0.603584, 0.107146, 1.236087 },
                                { 0, 0.504730, 1.632167, 0.603584, 0.501897, 0.828959, 0.259130 },
                                { 0, 2.480118, 2.502239, 0.107146, 0.828959, 0.486634, 2.206702 },
                                { 0, 2.562844, 2.351187, 1.236087, 0.259130, 2.206702, 0.747065 } };
static float  dm_20_6[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                { 0, 1.897075, 3.279011, 1.691793, 0.504730, 2.480118, 2.562844 },
                                { 0, 3.279011, 2.039856, 0.633859, 1.632167, 2.502239, 2.351187 },
                                { 0, 1.691793, 0.633859, 0.568358, 0.603584, 0.107146, 1.236087 },
                                { 0, 0.504730, 1.632167, 0.603584, 0.501897, 0.828959, 0.259130 },
                                { 0, 2.480118, 2.502239, 0.107146, 0.828959, 0.486634, 2.206702 },
                                { 0, 2.562844, 2.351187, 1.236087, 0.259130, 2.206702, 0.747065 } };
static float  dm_20_7[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                { 0, 1.896975, 3.278955, 1.691795, 0.504726, 2.480131, 2.562842 },
                                { 0, 3.278955, 2.039753, 0.633848, 1.632190, 2.502228, 2.351194 },
                                { 0, 1.691795, 0.633848, 0.568300, 0.603635, 0.107161, 1.236152 },
                                { 0, 0.504726, 1.632190, 0.603635, 0.501838, 0.829046, 0.259144 },
                                { 0, 2.480131, 2.502228, 0.107161, 0.829046, 0.486574, 2.206739 },
                                { 0, 2.562842, 2.351194, 1.236152, 0.259144, 2.206739, 0.746992 } };
static float  dm_20_8[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                { 0, 1.893588, 3.276862, 1.690784, 0.504129, 2.480570, 2.563086 },
                                { 0, 3.276862, 2.036224, 0.632813, 1.632784, 2.502765, 2.351393 },
                                { 0, 1.690784, 0.632813, 0.566635, 0.604567, 0.107215, 1.237196 },
                                { 0, 0.504129, 1.632784, 0.604567, 0.500459, 0.833358, 0.259465 },
                                { 0, 2.480570, 2.502765, 0.107215, 0.833358, 0.484631, 2.209749 },
                                { 0, 2.563086, 2.351393, 1.237196, 0.259465, 2.209749, 0.744986 } };
static float  dm_20_9[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                { 0, 1.884748, 3.272721, 1.689032, 0.502174, 2.481643, 2.563448 },
                                { 0, 3.272721, 2.026963, 0.630025, 1.634741, 2.503505, 2.351925 },
                                { 0, 1.689032, 0.630025, 0.562287, 0.606772, 0.108251, 1.240282 },
                                { 0, 0.502174, 1.634741, 0.606772, 0.496494, 0.843309, 0.260392 },
                                { 0, 2.481643, 2.503505, 0.108251, 0.843309, 0.479544, 2.217089 },
                                { 0, 2.563448, 2.351925, 1.240282, 0.260392, 2.217089, 0.739346 } };
static float  dm_20_10[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.724070, 3.286052, 1.745294, 0.494028, 2.511104, 2.531181 },
                                 { 0, 3.286052, 1.845625, 0.575819, 1.789622, 2.488166, 2.403681 },
                                 { 0, 1.745294, 0.575819, 0.464041, 0.655968, 0.086096, 1.231891 },
                                 { 0, 0.494028, 1.789622, 0.655968, 0.386445, 0.993640, 0.286030 },
                                 { 0, 2.511104, 2.488166, 0.086096, 0.993640, 0.381186, 2.210917 },
                                 { 0, 2.531181, 2.403681, 1.231891, 0.286030, 2.210917, 0.619655 } };
static float  dm_20_11[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.366924, 3.326755, 1.917379, 0.486377, 2.535956, 2.402764 },
                                 { 0, 3.326755, 1.458409, 0.487252, 2.081863, 2.377195, 2.464398 },
                                 { 0, 1.917379, 0.487252, 0.291262, 0.818906, 0.121663, 1.238422 },
                                 { 0, 0.486377, 2.081863, 0.818906, 0.204468, 1.272391, 0.381068 },
                                 { 0, 2.535956, 2.377195, 0.121663, 1.272391, 0.212433, 2.115436 },
                                 { 0, 2.402764, 2.464398, 1.238422, 0.381068, 2.115436, 0.410852 } };
static float  dm_20_12[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.349682, 3.322530, 1.923718, 0.483384, 2.534184, 2.393804 },
                                 { 0, 3.322530, 1.439522, 0.479792, 2.090923, 2.369673, 2.461525 },
                                 { 0, 1.923718, 0.479792, 0.284782, 0.836368, 0.126042, 1.246251 },
                                 { 0, 0.483384, 2.090923, 0.836368, 0.197208, 1.286660, 0.385916 },
                                 { 0, 2.534184, 2.369673, 0.126042, 1.286660, 0.206645, 2.118761 },
                                 { 0, 2.393804, 2.461525, 1.246251, 0.385916, 2.118761, 0.403098 } };
static float  dm_20_13[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.325594, 3.311550, 1.928873, 0.475383, 2.528168, 2.382278 },
                                 { 0, 3.311550, 1.412034, 0.461445, 2.106893, 2.361332, 2.453619 },
                                 { 0, 1.928873, 0.461445, 0.277185, 0.862477, 0.132110, 1.265629 },
                                 { 0, 0.475383, 2.106893, 0.862477, 0.186437, 1.309775, 0.393588 },
                                 { 0, 2.528168, 2.361332, 0.132110, 1.309775, 0.200886, 2.128515 },
                                 { 0, 2.382278, 2.453619, 1.265629, 0.393588, 2.128515, 0.394595 } };
static float  dm_20_14[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.311939, 3.299898, 1.933137, 0.471935, 2.529169, 2.375251 },
                                 { 0, 3.299898, 1.395992, 0.455706, 2.114821, 2.356211, 2.451006 },
                                 { 0, 1.933137, 0.455706, 0.271715, 0.884807, 0.131733, 1.269681 },
                                 { 0, 0.471935, 2.114821, 0.884807, 0.182317, 1.320966, 0.396050 },
                                 { 0, 2.529169, 2.356211, 0.131733, 1.320966, 0.199041, 2.134307 },
                                 { 0, 2.375251, 2.451006, 1.269681, 0.396050, 2.134307, 0.389641 } };
static float  dm_20_15[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.290169, 3.289532, 1.928987, 0.454296, 2.557077, 2.372959 },
                                 { 0, 3.289532, 1.366891, 0.412695, 2.119268, 2.344543, 2.452420 },
                                 { 0, 1.928987, 0.412695, 0.254556, 0.948114, 0.109102, 1.276760 },
                                 { 0, 0.454296, 2.119268, 0.948114, 0.179089, 1.351415, 0.361892 },
                                 { 0, 2.557077, 2.344543, 0.109102, 1.351415, 0.225454, 2.170825 },
                                 { 0, 2.372959, 2.452420, 1.276760, 0.361892, 2.170825, 0.384073 } };
static float  dm_20_16[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.241983, 3.298278, 2.020828, 0.408475, 2.597074, 2.370026 },
                                 { 0, 3.298278, 1.298912, 0.321238, 2.068440, 2.315534, 2.439604 },
                                 { 0, 2.020828, 0.321238, 0.220983, 1.147124, 0.213801, 1.254817 },
                                 { 0, 0.408475, 2.068440, 1.147124, 0.172898, 1.335235, 0.279635 },
                                 { 0, 2.597074, 2.315534, 0.213801, 1.335235, 0.296732, 2.123562 },
                                 { 0, 2.370026, 2.439604, 1.254817, 0.279635, 2.123562, 0.381151 } };
static float  dm_20_17[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 1.031083, 3.146699, 2.295330, 0.511540, 2.584730, 2.277981 },
                                 { 0, 3.146699, 1.064679, 0.357052, 2.105656, 2.264165, 2.292508 },
                                 { 0, 2.295330, 0.357052, 0.171546, 1.497354, 0.225501, 1.336781 },
                                 { 0, 0.511540, 2.105656, 1.497354, 0.136152, 1.441587, 0.273770 },
                                 { 0, 2.584730, 2.264165, 0.225501, 1.441587, 0.196237, 1.955911 },
                                 { 0, 2.277981, 2.292508, 1.336781, 0.273770, 1.955911, 0.267176 } };
static float  dm_20_18[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 0.943522, 3.116469, 2.274659, 0.422065, 2.542425, 2.299795 },
                                 { 0, 3.116469, 0.970661, 0.354446, 2.179069, 2.278761, 2.269135 },
                                 { 0, 2.274659, 0.354446, 0.148767, 1.494225, 0.206332, 1.496611 },
                                 { 0, 0.422065, 2.179069, 1.494225, 0.128695, 1.562489, 0.209998 },
                                 { 0, 2.542425, 2.278761, 0.206332, 1.562489, 0.230554, 1.946200 },
                                 { 0, 2.299795, 2.269135, 1.496611, 0.209998, 1.946200, 0.272444 } };
static float  dm_20_19[7][7] = { { 0, 0,        0,        0,        0,        0,        0        },
                                 { 0, 0.900882, 2.994246, 2.284230, 0.220253, 2.658395, 2.356499 },
                                 { 0, 2.994246, 0.929797, 0.286242, 2.159140, 2.277679, 2.304699 },
                                 { 0, 2.284230, 0.286242, 0.130488, 1.356211, 0.237656, 1.714175 },
                                 { 0, 0.220253, 2.159140, 1.356211, 0.130093, 1.740519, 0.194186 },
                                 { 0, 2.658395, 2.277679, 0.237656, 1.740519, 0.250414, 1.898882 },
                                 { 0, 2.356499, 2.304699, 1.714175, 0.194186, 1.898882, 0.292298 } };


float **
get_ribosum(const char  **Alseq,
            int         n_seq,
            int         length)
{
  int   i, j, k;
  float ident   = 0;
  float minimum = 1;
  float maximum = 0.;
  int   min;
  int   max;
  float **ribo;

  ribo = (float **)vrna_alloc(7 * sizeof(float *));
  for (i = 0; i < 7; i++)
    ribo[i] = (float *)vrna_alloc(7 * sizeof(float));
  for (j = 0; j < n_seq - 1; j++)
    for (k = j + 1; k < n_seq; k++) {
      ident = length - vrna_hamming_distance(Alseq[k], Alseq[j]);
      if ((ident / (length)) < minimum)
        minimum = ident / (float)(length);

      if ((ident / (length)) > maximum)
        maximum = ident / (float)(length);
    }
  /*+2.5 for ALWAYS round up*/
  minimum *= 100;
  maximum *= 100;
  minimum += 0.5;
  maximum += 0.5;
  if (n_seq == 1 || minimum > 100.45) {
    for (i = 0; i < 7; i++)
      for (j = 0; j < 7; j++)
        ribo[i][j] = 0.;
    return ribo;
  }

  min = (int)minimum / 5;
  max = (int)maximum / 5;

  if (max < 12)
    max = 12;

  if (min < 5)
    min = 5;

  if (min >= max)
    min = max - 1;

  switch (max) {
    case 12:
      switch (min) {
        case 5:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_12_5[i][j];
          break;
        case 6:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_12_6[i][j];
          break;
        case 7:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_12_7[i][j];
          break;
        case 8:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_12_8[i][j];
          break;
        case 9:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_12_9[i][j];
          break;
        case 10:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_12_10[i][j];
          break;
        case 11:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_12_11[i][j];
          break;
        default:
          vrna_log_error("da hats was grobes im dmchoose\n");
          return NULL;
      }
      break;
    case 13:
      switch (min) {
        case 5:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_13_5[i][j];
          break;
        case 6:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_13_6[i][j];
          break;
        case 7:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_13_7[i][j];
          break;
        case 8:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_13_8[i][j];
          break;
        case 9:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_13_9[i][j];
          break;
        case 10:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_13_10[i][j];
          break;
        case 11:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_13_11[i][j];
          break;
        case 12:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_13_12[i][j];
          break;
        default:
          vrna_log_error("da hats was grobes im dmchoose\n");
          return NULL;
      }
      break;
    case 14:
      switch (min) {
        case 5:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_14_5[i][j];
          break;
        case 6:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_14_6[i][j];
          break;
        case 7:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_14_7[i][j];
          break;
        case 8:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_14_8[i][j];
          break;
        case 9:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_14_9[i][j];
          break;
        case 10:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_14_10[i][j];
          break;
        case 11:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_14_11[i][j];
          break;
        case 12:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_14_12[i][j];
          break;
        case 13:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_14_13[i][j];
          break;
        default:
          vrna_log_error("da hats was grobes im dmchoose\n");
          return NULL;
      }
      break;
    case 15:
      switch (min) {
        case 5:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_15_5[i][j];
          break;
        case 6:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_15_6[i][j];
          break;
        case 7:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_15_7[i][j];
          break;
        case 8:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_15_8[i][j];
          break;
        case 9:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_15_9[i][j];
          break;
        case 10:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_15_10[i][j];
          break;
        case 11:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_15_11[i][j];
          break;
        case 12:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_15_12[i][j];
          break;
        case 13:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_15_13[i][j];
          break;
        case 14:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_15_14[i][j];
          break;
        default:
          vrna_log_error("da hats was grobes im dmchoose\n");
          return NULL;
      }
      break;
    case 16:
      switch (min) {
        case 5:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_16_5[i][j];
          break;
        case 6:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_16_6[i][j];
          break;
        case 7:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_16_7[i][j];
          break;
        case 8:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_16_8[i][j];
          break;
        case 9:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_16_9[i][j];
          break;
        case 10:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_16_10[i][j];
          break;
        case 11:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_16_11[i][j];
          break;
        case 12:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_16_12[i][j];
          break;
        case 13:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_16_13[i][j];
          break;
        case 14:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_16_14[i][j];
          break;
        case 15:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_16_15[i][j];
          break;
        default:
          vrna_log_error("da hats was grobes im dmchoose\n");
          return NULL;
      }
      break;
    case 17:
      switch (min) {
        case 5:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_17_5[i][j];
          break;
        case 6:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_17_6[i][j];
          break;
        case 7:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_17_7[i][j];
          break;
        case 8:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_17_8[i][j];
          break;
        case 9:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_17_9[i][j];
          break;
        case 10:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_17_10[i][j];
          break;
        case 11:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_17_11[i][j];
          break;
        case 12:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_17_12[i][j];
          break;
        case 13:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_17_13[i][j];
          break;
        case 14:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_17_14[i][j];
          break;
        case 15:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_17_15[i][j];
          break;
        case 16:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_17_16[i][j];
          break;
        default:
          vrna_log_error("da hats was grobes im dmchoose\n");
          return NULL;
      }
      break;
    case 18:
      switch (min) {
        case 5:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_18_5[i][j];
          break;
        case 6:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_18_6[i][j];
          break;
        case 7:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_18_7[i][j];
          break;
        case 8:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_18_8[i][j];
          break;
        case 9:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_18_9[i][j];
          break;
        case 10:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_18_10[i][j];
          break;
        case 11:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_18_11[i][j];
          break;
        case 12:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_18_12[i][j];
          break;
        case 13:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_18_13[i][j];
          break;
        case 14:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_18_14[i][j];
          break;
        case 15:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_18_15[i][j];
          break;
        case 16:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_18_16[i][j];
          break;
        case 17:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_18_17[i][j];
          break;
        default:
          vrna_log_error("da hats was grobes im dmchoose\n");
          return NULL;
      }
      break;
    case 19:
      switch (min) {
        case 5:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_19_5[i][j];
          break;
        case 6:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_19_6[i][j];
          break;
        case 7:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_19_7[i][j];
          break;
        case 8:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_19_8[i][j];
          break;
        case 9:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_19_9[i][j];
          break;
        case 10:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_19_10[i][j];
          break;
        case 11:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_19_11[i][j];
          break;
        case 12:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_19_12[i][j];
          break;
        case 13:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_19_13[i][j];
          break;
        case 14:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_19_14[i][j];
          break;
        case 15:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_19_15[i][j];
          break;
        case 16:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_19_16[i][j];
          break;
        case 17:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_19_17[i][j];
          break;
        case 18:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_19_18[i][j];
          break;
        default:
          vrna_log_error("da hats was grobes im dmchoose\n");
          return NULL;
      }
      break;
    case 20:
      switch (min) {
        case 5:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_20_5[i][j];
          break;
        case 6:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_20_6[i][j];
          break;
        case 7:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_20_7[i][j];
          break;
        case 8:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_20_8[i][j];
          break;
        case 9:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_20_9[i][j];
          break;
        case 10:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_20_10[i][j];
          break;
        case 11:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_20_11[i][j];
          break;
        case 12:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_20_12[i][j];
          break;
        case 13:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_20_13[i][j];
          break;
        case 14:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_20_14[i][j];
          break;
        case 15:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_20_15[i][j];
          break;
        case 16:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_20_16[i][j];
          break;
        case 17:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_20_17[i][j];
          break;
        case 18:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_20_18[i][j];
          break;
        case 19:
          for (i = 0; i < 7; i++)
            for (j = 0; j < 7; j++)
              ribo[i][j] = dm_20_19[i][j];
          break;
        default:
          vrna_log_error("da hats was grobes im dmchoose\n");
          return NULL;
      }
      break;
    default:
      vrna_log_error("da hats was grobes im dmchoose\n");
      return NULL;
  }
  return ribo;
}


PUBLIC float **
readribosum(char *name)
{
  float **dm;
  char  *line;
  FILE  *fp;
  int   i = 0;
  int   who = 0;
  float a, b, c, d, e, f;
  int   translator[7] = {
    0, 5, 1, 2, 3, 6, 4
  };

  fp  = fopen(name, "r");
  dm  = (float **)vrna_alloc(7 * sizeof(float *));
  for (i = 0; i < 7; i++)
    dm[i] = (float *)vrna_alloc(7 * sizeof(float));
  while (1) {
    /*bisma hoit fertisch san*/
    line = vrna_read_line(fp);
    if (*line == '#')
      continue;

    i = 0;
    i = sscanf(line, "%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f);
    if (i == 0)
      break;

    dm[translator[++who]][translator[1]]  = a;
    dm[translator[who]][translator[2]]    = b;
    dm[translator[who]][translator[3]]    = c;
    dm[translator[who]][translator[4]]    = d;
    dm[translator[who]][translator[5]]    = e;
    dm[translator[who]][translator[6]]    = f;
    free(line);
    if (who == 6)
      break;
  }
  fclose(fp);
  return dm;
}
